<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="/static/lib/html5shiv.js"></script>
<script type="text/javascript" src="/static/lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/static/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="/static/lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>内容字段获取规则</title>
</head>
<body>
<article class="page-container">
    <div class="panel panel-default">
	    <div class="panel-header">内容字段获取规则</div>
        <div class="panel-body">
	        <form class="form form-horizontal" method="post" id="form-article-add">
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>预览网址：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <input type="text" class="input-text" value="" placeholder="预览网址" id="yuurl" name="yuurl">
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>目标页面编码：</label>
                    <div class="formControls col-xs-8 col-sm-9">
                        <span class="select-box">
                            <select name="charset" class="select">
                                <option value="1" {% if row.charset == 1 %} selected="selected" {% endif %}>UTF8</option>
                                <option value="2" {% if row.charset == 2 %} selected="selected" {% endif %}>GB2312</option>
                            </select>
                        </span>
                    </div>
                </div>
                <div class="row cl">
                    <label class="form-label col-xs-4 col-sm-2">内容分页导航所在的区域匹配规则：</label>
                    <div class="formControls col-xs-5 col-sm-6">
                        <textarea name="match_page" id="match_page" cols="" rows="" class="textarea"  placeholder="内容分页导航所在的区域匹配规则">{{ row.match_page }}</textarea>
                    </div>
                    <div class="col-xs-3 col-xs-4">
                        <p>方式：</p>
                        <div class="formControls skin-minimal">
                            <div class="radio-box">
                                <input name="match_page_retype" type="radio" value="1" id="match_page_retype1" {% if row.match_page_retype==1 %}checked{% endif %}>
                                <label for="match_page_retype1">正则</label>
                            </div>
                            <div class="radio-box">
                                <input type="radio" id="match_page_retype2" value="2" name="match_page_retype" {% if row.match_page_retype==2 %}checked{% endif %}>
                                <label for="match_page_retype2">CSS</label>
                            </div>
                            <div class="radio-box">
                                <input type="radio" id="match_page_retype3" value="3" name="match_page_retype" {% if row.match_page_retype==3 %}checked{% endif %}>
                                <label for="match_page_retype3">xPath</label>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="line mt-20"></div>
                <div class="panel panel-primary">
                    <div class="panel-header">文章标题</div>
                    <div class="panel-body">
                        <div class="row cl">
                            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>匹配规则：</label>
                            <div class="formControls col-xs-5 col-sm-6">
                                <textarea name="match_title" id="match_title" cols="" rows="" class="textarea"  placeholder="匹配规则">{{ row.match_title }}</textarea>
                            </div>
                            <div class="col-xs-3 col-xs-4">
                                <p>方式：</p>
                                <div class="formControls skin-minimal">
                                    <div class="radio-box">
                                        <input name="match_title_retype" type="radio" value="1" id="match_title_retype1"  {% if row.match_title_retype==1 %}checked{% endif %}>
                                        <label for="match_title_retype1">正则</label>
                                    </div>
                                    <div class="radio-box">
                                        <input type="radio" id="match_title_retype2" value="2" name="match_title_retype" {% if row.match_title_retype==2 %}checked{% endif %}>
                                        <label for="match_title_retype2">CSS</label>
                                    </div>
                                    <div class="radio-box">
                                        <input type="radio" id="match_title_retype3" value="3" name="match_title_retype" {% if row.match_title_retype==3 %}checked{% endif %}>
                                        <label for="match_title_retype3">xPath</label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row cl">
                            <label class="form-label col-xs-4 col-sm-2">过滤规则：</label>
                            <div class="formControls col-xs-5 col-sm-6">
                                <textarea name="trim_title" id="trim_title" cols="" rows="" class="textarea"  placeholder="过滤规则">{{ row.trim_title }}</textarea>
                            </div>
                            <div class="col-xs-3 col-xs-4">
                                {replace key="***"}{/replace}
                            </div>
                        </div>
                    </div>
                </div>
                <div class="line mt-20"></div>
                <div class="panel panel-primary">
                    <div class="panel-header">文章内容</div>
                    <div class="panel-body">
                        <div class="row cl">
                            <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>匹配规则：</label>
                            <div class="formControls col-xs-5 col-sm-6">
                                <textarea name="match_body" id="match_body" cols="" rows="" class="textarea"  placeholder="匹配规则">{{ row.match_body }}</textarea>
                            </div>
                            <div class="col-xs-3 col-xs-4">
                                <p>方式：</p>
                                <div class="formControls skin-minimal">
                                    <div class="radio-box">
                                        <input name="match_body_retype" type="radio" value="1" id="match_body_retype1" {% if row.match_body_retype==1 %}checked{% endif %}>
                                        <label for="match_body_retype1">正则</label>
                                    </div>
                                    <div class="radio-box">
                                        <input type="radio" id="match_body_retype2" value="2" name="match_body_retype" {% if row.match_body_retype==2 %}checked{% endif %}>
                                        <label for="match_body_retype2">CSS</label>
                                    </div>
                                    <div class="radio-box">
                                        <input type="radio" id="match_body_retype3" value="3" name="match_body_retype" {% if row.match_body_retype==3 %}checked{% endif %}>
                                        <label for="match_body_retype3">xPath</label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row cl">
                            <label class="form-label col-xs-4 col-sm-2">过滤规则：</label>
                            <div class="formControls col-xs-5 col-sm-6">
                                <textarea name="trim_body" id="trim_body" cols="" rows="" class="textarea"  placeholder="过滤规则">{{ row.trim_body }}</textarea>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="row cl">
                    <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
                        <button  class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 保存下一步测试预览网址</button>
                        <button onClick="goback();" class="btn btn-default radius" type="button">&nbsp;&nbsp;返回上一步修改&nbsp;&nbsp;</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</article>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="/static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer /作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="/static/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">
	$(function(){
	    $('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	    });

		//表单验证
		$("#form-article-add").validate({
			rules:{
				
				match_title:{
					required:true,
				},
				match_title_retype:{
					required:true,
				},
				match_body:{
					required:true,
				},
				match_body_retype:{
					required:true,
				}
			},
			onkeyup:false,
			focusCleanup:true,
			success:"valid",
			submitHandler:function(form){
				var index1 = parent.layer.load();
	            $(form).ajaxSubmit(function(data){
	                parent.layer.close(index1);
	                try{
	                    var ojb = JSON.parse(data);
	                }catch(err){
	                    var ojb = data;
	                }
	                if (ojb.code==1) {
	                    var index = parent.layer.getFrameIndex(window.name);
	                    window.parent.layer.msg('保存成功!',{icon:1,time:1000});
	                    location.href='/collection_show?id={{ id }}&url='+ojb.data;
	                }else{
	                    window.parent.layer.msg(ojb.msg,{icon:5,time:1000});
	                }
	            });
			}
		});
		
	});
	function removeIframe(){
		var index = parent.layer.getFrameIndex(window.name);
		parent.layer.close(index);
	}
    function goback(){
        location.href="/collection_getlist?id={{ id }}"
    }
	
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>